package itcz.example.pattern.behavior_type.state.deom1;

/**
 * @ClassName: Lift
 * @Author: ITCZ
 * @Date: 2025-07-26
 * @Description: 状态类 - 具体状态角色
 */
public class CloseState extends LiftState {

    @Override
    public void open() {
        System.out.println("电梯门关闭...");
    }

    @Override
    public void close() {
        super.context.setLiftState(Context.openState);
        super.context.open();
    }

    @Override
    public void run() {
        super.context.setLiftState(Context.runState);
        super.context.run();
    }

    @Override
    public void stop() {
        super.context.setLiftState(Context.stopState);
        super.context.stop();
    }
}
